<template>
    <view class="recommendP" >

        <view :style="{ margin:'2rem',fontSize:'1rem' }" >请输入推荐人ID号码</view>

            <view>
            <!-- <u-message-input ref="input" type='text'  value='' @finish='finishM' mode='bottomLine' :maxlength='7' :focus="true" ></u-message-input> -->
            <u-field
			v-model="code"
            maxlength='7'
			placeholder="请输入推荐人ID号码"
		>
		</u-field>
            <view>

             </view>
            </view>

        <view class="nextP" >
           <view class="loginBtnP">
      <view class="loginBtn" @click="goRecommend"  >下一步</view>
    </view>
        </view>
    
    </view>
</template>

<script lang='ts' >

 import { Component, Prop,Vue, Watch ,Emit} from 'vue-property-decorator'


 @Component({    
        name: 'test',
    })
    export default class extends Vue {  



        public code=''
        
  created() {
    wx.setNavigationBarTitle({
      title: "推荐码",
    });

    console.log("313123123");
  }

  finishM(data:any){
  
   console.log('finishM',data)

   this.code=data

  }

  goRecommend(){
  
    console.log('推荐码')
     uni.navigateTo({
                 url: `./register?num=${this.code}`,
                });

  }

          mounted() {
                 
                //  (this.$refs.input as any ).type ="text"

                //  console.log(this.$refs.input.$el.children[0],'123')
          }

          @Emit('bindSend')   //@Emit()不传参数,那么它触发的事件名就是它所修饰的函数名.
           send(msgC: string){
               //return 123      //如果没有返回值 那么传递的参数就是参数
           }; 
          
    }
</script>

<style  lang="scss"  scoped>

/deep/.uni-input-input[type="text"]{
//  color: red;
}


    .nextP{
    
        margin-top: 3rem;
    }
.loginBtnP {
    width: 100%;
    display: flex;
    justify-content: center;
    
  }
  .loginBtn {
      width: 14rem;
      padding: 0.5rem;
      background-color: #02af74;
      border-radius: 0.5rem;
      color: white;
      text-align: center;
      font-size: 1.1rem;
    }
</style>